/* 用户名验证规则 */
export const validateAccount = (value) => {
  let reg = /^(?=.*\d)([A-Za-z\d]|-_){6,20}$/
  return reg.test(value);
};

/* 密码验证规则 */
export const validatePass = (value) => {
  let reg = /^(?=.*\d)[A-Za-z\d]{6,20}$/
  return reg.test(value);
};


/* 手机号码验证规则 */
export const validatePhone = (value) => {
  let reg = /^(13\d|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18\d|19[89])\d{8}$/
  return reg.test(value);
};

/* 验证码验证规则 */
export const validateCode = (value) => {
  let reg = /^(\d|\w){4}$/
  return reg.test(value);
};


